import axios from './axios.js'

export const getMenu = function(param,pageSize){
	return axios.request({
		url:'get/news',
		method:'get',
		params:{
			pageindex:param,//页码
			pagesize:pageSize//数量
		}
	})
}
export const postMenu = function(options){
	return axios.request({
		url:'add/news',
		method:'post',
		data:options
	})
}
export const deleteNews = function(options){
	return axios.request({
		url:'delete/news',
		method:'post',
		data:options
	})
}

export const editNews = function(options){
	return axios.request({
		url:'edit/news',
		method:'get',
		params:{
			name:options
		}
	})
}
export const posteditNews = function(data){
	return axios.request({
		url:'edit/news',
		method:'post',
		data
	})
}